#include "AVLTree.h"
#include <stdio.h>

AVLNode *tree;

void ReadTree(AVLNode* tree, int type)
{
    if(tree == NULL)
        return;
    if(type == 0)
        printf("%d", tree->value);
    ReadTree(tree->left, type);
    if(type == 1)
        printf("%d", tree->value);
    ReadTree(tree->right, type);
    if(type == 2)
        printf("%d", tree->value);
}

int main()
{
    tree = Insert_AVLNode(tree, 0);
    tree = Insert_AVLNode(tree, 1);
    tree = Insert_AVLNode(tree, 2);
    tree = Insert_AVLNode(tree, 3);
    tree = Insert_AVLNode(tree, 4);
    tree = Del_AVLNode(tree, 1);
    ReadTree(tree, 0);
    ReadTree(tree, 1);
    return 0;
}